package cn.id68.www.http.builder;

import cn.id68.www.http.RequestCall;
import cn.id68.www.http.request.PostStringRequest;
import okhttp3.MediaType;

/**
 * Created by Administrator on 2017/3/21.
 */
public class PostStringBuilder extends OkHttpRequestBuilder<PostFileBuilder> {

    private String content;
    private MediaType mediaType;

    public PostStringBuilder(String content, MediaType mediaType) {
        this.content = content;
        this.mediaType = mediaType;
    }

    public PostStringBuilder content(String content){
        this.content = content;
        return this;
    }

    public PostStringBuilder mediaType(MediaType mediaType){
        this.mediaType = mediaType;
        return this;
    }

    @Override
    public RequestCall build() {
        return new PostStringRequest(url,tag,params,headers,id,content,mediaType).build();
    }
}
